package com.jiangnan.view;

import javax.swing.*;
import java.awt.*;

public class HomeFrame extends BaseFrame {

    private static HomeFrame homeFrame;

    private HomeFrame() throws HeadlessException {
        //设置图标
        this.setIconImage(new ImageIcon(getClass().getResource("/image/CutLogo.png")).getImage());
        this.setTitle("NetFlowCut");
        this.setSize(1200,1000);
        this.setLocationRelativeTo(null);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        //homeJPanel
        HomeJPanel homePanel = new HomeJPanel();
        this.setContentPane(homePanel);
    }

    public static HomeFrame frame() {
        if (homeFrame == null) {
            homeFrame = new HomeFrame();
        }
        return homeFrame;
    }

}
